package org.xymtop.tbdemo.hander;


import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.springframework.stereotype.Component;
import org.xymtop.tbdemo.xmqtt.ann.XSubscription;
import org.xymtop.tbdemo.xmqtt.hander.XHander;

@Component
@XSubscription(topic = "testtopic/1")
public class TestMessageHander implements XHander {
    @Override
    public int getOrder() {
        return 0;
    }

    @Override
    public MqttMessage hander(MqttMessage msg) {
        System.out.println(msg.toString());
        return  msg;
    }


}
